# -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html

import scrapy


"""Category  tb_course_category
课程分类   id   name    parent 
"""
class CategoryItem(scrapy.Item):

    id = scrapy.Field()
    name = scrapy.Field()
    parent_id = scrapy.Field()   # 父类id



"""Teacher   tb_teachers
老师   id   name    positional_title    profile   avatar_url  
"""
class TeacherItem(scrapy.Item):

    id = scrapy.Field()
    name = scrapy.Field()
    avatar_url = scrapy.Field()       # 图片url
    profile = scrapy.Field()          # 简介
    positional_title = scrapy.Field() # 职称



"""Chapter     tb_chapter
课程章节  id   name   title
"""
class ChapterItem(scrapy.Item):

    id = scrapy.Field()
    name = scrapy.Field()
    title = scrapy.Field()



"""
课程详情 tb_course_detail
   # id, title,intro, cover_url,content,video_url,price,duration
"""
class CourseDetailItem(scrapy.Item):

    id = scrapy.Field()
    title = scrapy.Field()
    intro = scrapy.Field()
    cover_url = scrapy.Field()
    content = scrapy.Field()
    video_url = scrapy.Field()
    price = scrapy.Field()
    duration = scrapy.Field()



"""Course 、 CourseInfo   tb_course
课程 [商品]
   #  id  category_id  teacher_id  chapter_id  course_detail_id  title  cover_url  video_url  intro  content  price   duration
"""
class CourseItem(scrapy.Item):

    id = scrapy.Field()          # 课程id
    category_id = scrapy.Field() # 分类id
    teacher_id = scrapy.Field()  # 讲师id
    chapter_id = scrapy.Field()  # 章节id
    course_detail_id = scrapy.Field() # 详情id
    title = scrapy.Field()     # 标题
    cover_url = scrapy.Field() # 图片url
    video_url = scrapy.Field() # 视频url
    intro = scrapy.Field()# 描述
    content = scrapy.Field()   # 内容
    price = scrapy.Field()     # 价格
    duration = scrapy.Field()  # 时长


